home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmOpenURL
- Caption = "Open a URL into the Default Internet Browser"
- ClientHeight = 2520
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 5370
- Icon = "frmOpenURL.frx":0000
- LinkTopic = "Form1"
- ScaleHeight = 2520
- ScaleWidth = 5370
- StartUpPosition = 3 'Windows Default
- Begin VB.Label Label3
- Alignment = 1 'Right Justify
- AutoSize = -1 'True
- Caption = "Written for the VB Center Code Library"
- BeginProperty Font
- Name = "Small Fonts"
- Size = 6.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 165
- Left = 2940
- TabIndex = 3
- Top = 2040
- Width = 2355
- End
- Begin VB.Label Label2
- Alignment = 1 'Right Justify
- AutoSize = -1 'True
- Caption = "http://www.geocities.com/SiliconValley/Way/6445"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00800000&
- Height = 195
- Left = 960
- TabIndex = 2
- Top = 2280
- Width = 4365
- End
- Begin VB.Label Label1
- Caption = "Click the link below to open the URL ""http://www.microsoft.com"" into the Default Internet Browser:"
- Height = 375
- Left = 120
- TabIndex = 1
- Top = 120
- Width = 5055
- End
- Begin VB.Label URL
- AutoSize = -1 'True
- Caption = "http://www.microsoft.com"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = -1 'True
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FF0000&
- Height = 195
- Left = 120
- TabIndex = 0
- Top = 720
- Width = 1845
- End
- Attribute VB_Name = "frmOpenURL"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- #If Win32 Then
- Private Declare Function ShellExecute Lib _
- "shell32.dll" Alias "ShellExecuteA" _
- (ByVal hwnd As Long, _
- ByVal lpOperation As String, _
- ByVal lpFile As String, _
- ByVal lpParameters As String, _
- ByVal lpDirectory As String, _
- ByVal nShowCmd As Long) As Long
- #Else
- Private Declare Function ShellExecute Lib _
- "shell.dll" _
- (ByVal hwnd As Integer, _
- ByVal lpOperation As String, _
- ByVal lpFile As String, _
- ByVal lpParameters As String, _
- ByVal lpDirectory As String, _
- ByVal nShowCmd As Integer) As Integer
- #End If
- Private Const SW_SHOWNORMAL = 1
- Private Sub Picture1_Click()
- Dim iret As Long
- ' open URL into the default internet browser
- iret = ShellExecute(Me.hwnd, _
- vbNullString, _
- "http://www.geocities.com/SiliconValley/Way/6445", _
- vbNullString, _
- "c:\", _
- SW_SHOWNORMAL)
- End Sub
- Private Sub URL_Click()
- Dim iret As Long
- ' open URL into the default internet browser
- iret = ShellExecute(Me.hwnd, _
- vbNullString, _
- "http://www.microsoft.com", _
- vbNullString, _
- "c:\", _
- SW_SHOWNORMAL)
- End Sub
-